package com.example.forum.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.Date;

@Data
public class User {
    private Long id;

    private String username;

    @JsonIgnore
    private String password;

    private String nickname;

    private String phoneNum;

    private String email;

    private Byte gender;

    @JsonIgnore
    private String salt;

    private String avatarUrl;

    private Integer articleCount;

    private Byte isAdmin;

    private String remark;

    private Byte state;

    @JsonIgnore
    private Byte deleteState;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")//局部的时间格式
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")//局部的时间格式
    private Date updateTime;
}